#pragma once
#include <memory>
#include <SFML/System.hpp>

class ThreadTask
{
    friend class ThreadTaskData;
public:
	ThreadTask();
	virtual ~ThreadTask();
public:
    void start();
    bool isStarted() const;
    bool isDone() const;
    void wait(int mstime = 10) const;
protected:
    void makeDone();
    virtual void run() = 0;
private:
    std::unique_ptr<class ThreadTaskData> data;
};
